package com.ruoyi.costumeShop.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.costumeShop.mapper.CostumeSalespersonMapper;
import com.ruoyi.costumeShop.domain.CostumeSalesperson;
import com.ruoyi.costumeShop.service.ICostumeSalespersonService;

/**
 * salespersonService业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-22
 */
@Service
public class CostumeSalespersonServiceImpl implements ICostumeSalespersonService 
{
    @Autowired
    private CostumeSalespersonMapper costumeSalespersonMapper;

    /**
     * 查询salesperson
     * 
     * @param salespersonId salesperson主键
     * @return salesperson
     */
    @Override
    public CostumeSalesperson selectCostumeSalespersonBySalespersonId(Long salespersonId)
    {
        return costumeSalespersonMapper.selectCostumeSalespersonBySalespersonId(salespersonId);
    }

    /**
     * 查询salesperson列表
     * 
     * @param costumeSalesperson salesperson
     * @return salesperson
     */
    @Override
    public List<CostumeSalesperson> selectCostumeSalespersonList(CostumeSalesperson costumeSalesperson)
    {
        return costumeSalespersonMapper.selectCostumeSalespersonList(costumeSalesperson);
    }

    /**
     * 新增salesperson
     * 
     * @param costumeSalesperson salesperson
     * @return 结果
     */
    @Override
    public int insertCostumeSalesperson(CostumeSalesperson costumeSalesperson)
    {
        return costumeSalespersonMapper.insertCostumeSalesperson(costumeSalesperson);
    }

    /**
     * 修改salesperson
     * 
     * @param costumeSalesperson salesperson
     * @return 结果
     */
    @Override
    public int updateCostumeSalesperson(CostumeSalesperson costumeSalesperson)
    {
        return costumeSalespersonMapper.updateCostumeSalesperson(costumeSalesperson);
    }

    /**
     * 批量删除salesperson
     * 
     * @param salespersonIds 需要删除的salesperson主键
     * @return 结果
     */
    @Override
    public int deleteCostumeSalespersonBySalespersonIds(Long[] salespersonIds)
    {
        return costumeSalespersonMapper.deleteCostumeSalespersonBySalespersonIds(salespersonIds);
    }

    /**
     * 删除salesperson信息
     * 
     * @param salespersonId salesperson主键
     * @return 结果
     */
    @Override
    public int deleteCostumeSalespersonBySalespersonId(Long salespersonId)
    {
        return costumeSalespersonMapper.deleteCostumeSalespersonBySalespersonId(salespersonId);
    }
}
